import '../../../bean/home_bean.dart';

/// ### 调整数据
/// #### [data] HomeBean|必填|数据源
/// #### [filterTimer] List<dynamic>|选填|过滤的条件
HomeBean formatData(HomeBean data,{ List<dynamic> filterTimer }) {
  if(filterTimer != null) {
    for (var i = 0; i < data.moduleList.length; i++) {
      if (filterTimer.indexOf(data.moduleList[i].moduleType) >= 0) {
        data.moduleList.removeAt(i);
        break;
      }
    }
  }

  // 返回调整后的数据
  return data;
}